#include "ThreadPool.hpp"

using namespace ThreadPoolModual;
using task_t = function<void()>;
void func()
{
    sleep(1);
}
int main()
{
    ENABLE_CONSOLE_LOG_STRATEGY();
    // ENABLE_FILE_LOG();

    std::unique_ptr<ThreadPool<task_t>> tp = std::make_unique<ThreadPool<task_t>>();
    tp->Start();

    int cnt = 10;
    char c;
    while (cnt)
    {
        tp->Enqueue(func);
        cnt--;
        sleep(1);
    }

    tp->Stop();
    tp->Wait();

    return 0;
}